package com.sg.dto.integration.component;

import com.sg.common.dto.BaseDto;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.util.Objects;

/**
 * @desc DynamicLookupDataDto
 * @使用场景
 */
@Data
public class DynamicLookupDataDto extends BaseDto implements Serializable {

    /**
     * 内容表主键ID
     */
    @ApiModelProperty("内容表主键ID")
    private String conEntityId;

    /**
     * 冗余评价模板ID
     */
    @ApiModelProperty("冗余评价模板ID")
    private String evaluationTemplateId;

    /**
     * 创建于空间ID
     */
    @ApiModelProperty("创建于空间ID")
    private String spaceId;

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        if (!super.equals(o)) return false;
        DynamicLookupDataDto that = (DynamicLookupDataDto) o;
        return (
                conEntityId == that.conEntityId &&
                        evaluationTemplateId == that.evaluationTemplateId &&
                        spaceId == that.spaceId
        );
    }

    @Override
    public int hashCode() {
        return Objects.hash(
                super.hashCode(),
                conEntityId,
                evaluationTemplateId,
                spaceId
        );
    }

}
